import type { ReactNode } from "react"

interface EmptyStateProps {
    icon: ReactNode
    title: string
    description: string
    action?: ReactNode
    className?: string  // 添加 className 属性
}

export function EmptyState({ icon, title, description, action, className }: EmptyStateProps) {
    return (
        <div className={`flex min-h-[400px] flex-col items-center justify-center space-y-4 py-10 ${className}`}>
            {icon}
            <h3 className="text-lg font-semibold">{title}</h3>
            <p className="text-sm text-muted-foreground text-center max-w-md">{description}</p>
            {action}
        </div>
    )
}
